package org.zl.service.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zl.mapper.UndergraduateMapper;
import org.zl.pojo.Undergraduate;
import org.zl.service.UndergraduateService;

@Service
public class UndergraduateServiceImpl implements UndergraduateService {

	@Autowired
	private UndergraduateMapper mapper;

	@Override
	public List<Undergraduate> getStudentByClazz() {
		return mapper.getStudentByClazz();
	}

	@Override
	public Integer getStudentCountByClazz(Integer majId) {
		return mapper.getStudentCountByClazz(majId);
	}

	@Override
	public List<Undergraduate> getStudentsByClazz4Page(Integer majId, Integer recordBegin, Integer pageSize) {
		recordBegin=(recordBegin-1)*pageSize>0?(recordBegin-1)*pageSize:0;
		return mapper.getStudentsByClazz4Page(majId, recordBegin, pageSize);
	}


}
